Don't schedule work for reboot if work is already scheduled. This fixes a
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Sun, 30 Oct 2005 12:52:38 +0000 (13:52 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Sun, 30 Oct 2005 12:52:38 +0000 (13:52 +0100)
problem whereby migrated domains would shut themselves down immediately,
because the watch from the removal of the control/shutdown node would fire
after the workqueue had started, but before the domain was suspended, meaning
that an additional piece of work was scheduled, which ran immediately after the
domain was resumed.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
linux-2.6-xen-sparse/arch/xen/kernel/reboot.c

index a8f42dc3e7bb0dd3c8ed1ba3f09d24770863c363..fbac789592565368f82f6771b0ac345b881bb790 100644 (file)
@@ -283,7 +283,7 @@ static void shutdown_handler(struct xenbus_watch *watch,
        int err;
 
        if (shutting_down != SHUTDOWN_INVALID)
-               goto out;
+               return;
 
  again:
        xbt = xenbus_transaction_start();